CC := g++
CFLAGS := -c -Wall
LDFLAGS := -lSDLmain -lSDL -lSDL_image -lSDL_gfx
SOURCES := src/*.cpp src/*/*.cpp
INCLUDE := -Isrc
OBJECTS := $(SOURCES: .cpp=.o)
EXECUTABLE := smashmon

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(INCLUDE) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< $(INCLUDE) -o $@

clean:
	rm -f *.o *~
